﻿using DynamicViewFormApp.Entity;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace DynamicViewFormApp.Setting
{
    /// <summary>
    /// 分页设置
    /// </summary>
    class PageSetting
    {
        //页面偏移
        private static int pageOffSet = 40;
        //页面数量
        private static int pageSize = 1;

        private static string pageIndex = "1";
        //分页集合
        private static List<Panel> pagePanelList = new List<Panel>();

        private static List<PageEntity> pageLocationList = new List<PageEntity>();

        private static List<RichTextBox> richTextBoxeList = new List<RichTextBox>();

        private static Point preScrollPoint;

        /// <summary>
        /// 页面偏移量
        /// </summary>
        public static int PageOffSet { get => pageOffSet; set => pageOffSet = value; }
        /// <summary>
        /// 页面数量
        /// </summary>
        public static int PageSize { get => pageSize; set => pageSize = value; }
        public static string PageIndex { get => pageIndex; set => pageIndex = value; }
        public static List<Panel> PagePanelList { get => pagePanelList; set => pagePanelList = value; }
        public static Point PreScrollPoint { get => preScrollPoint; set => preScrollPoint = value; }
        public static List<RichTextBox> RichTextBoxeList { get => richTextBoxeList; set => richTextBoxeList = value; }
        internal static List<PageEntity> PageLocationList { get => pageLocationList; set => pageLocationList = value; }

        internal static void Init()
        {
            pagePanelList = new List<Panel>();
            pageLocationList = new List<PageEntity>();
            richTextBoxeList = new List<RichTextBox>();
        }
    }
}
